package com.goldman.aplt.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.goldman.aplt.base.entity.BaseBankEntity;
import com.goldman.aplt.base.type.BaseEnumType;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.io.Serializable;
import java.math.BigDecimal;

/**
 * 核心记账登记表
 * @TableName aps_core_accounting
 */
@TableName(value ="aps_core_accounting")
@Data
@Builder
@AllArgsConstructor
@NoArgsConstructor
public class ApsCoreAccounting extends BaseBankEntity{

    /**
     * 业务流水
     */
    @TableField(value = "busi_seq")
    private String busiSeq;

    /**
     * 记账序号
     */
    @TableField(value = "sort")
    private Integer sort;

    /**
     * 核心调用流水号
     */
    @TableField(value = "call_seq")
    private String callSeq;

    /**
     * 业务场景码
     */
    @TableField(value = "scen_code")
    private String scenCode;

    /**
     * 账号
     */
    @TableField(value = "acct_no")
    private String acctNo;

    /**
     * 核心产品
     */
    @TableField(value = "core_prod")
    private String coreProd;

    /**
     * 交易类型
     */
    @TableField(value = "tran_type")
    private String tranType;

    /**
     * 交易金额
     */
    @TableField(value = "trxn_amt")
    private BigDecimal trxnAmt;

    /**
     * 交易备注
     */
    @TableField(value = "tran_note")
    private String tranNote;

    /**
     * 对手账号
     */
    @TableField(value = "opp_acct_no")
    private String oppAcctNo;

    /**
     * 对手真实账号
     */
    @TableField(value = "opp_real_acct_no")
    private String oppRealAcctNo;

    /**
     * 对手账号名称
     */
    @TableField(value = "opp_real_acc_name")
    private String oppRealAccName;

    /**
     * 对手账号银行
     */
    @TableField(value = "opp_real_bank_code")
    private String oppRealBankCode;

    /**
     * 记账状态
     */
    @TableField(value = "accounting_status")
    private BaseEnumType.E_ACCOUNTING_STATUS accountingStatus;

    /**
     * 错误code
     */
    @TableField(value = "error_code")
    private String errorCode;

    /**
     * 错误信息
     */
    @TableField(value = "error_msg")
    private String errorMsg;

    /**
     * 是否重试
     */
    @TableField(value = "retry_ind")
    private BaseEnumType.E_YESORNO retryInd;

    /**
     * 重试次数
     */
    @TableField(value = "error_count")
    private Integer errorCount;

    /**
     * 最大次数
     */
    @TableField(value = "max_retry_count")
    private Integer maxRetryCount;

}